#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2020/7/11 10:57
# @Author  : CoderCharm
# @File    : role_schema.py
# @Software: PyCharm
# @Desc    :
"""
权限表
"""
from typing import Optional

from pydantic import BaseModel


class RoleCreate(BaseModel):
    """
    创建角色字段
    """
    name: str
    pid: int




class Role_Resource(BaseModel):
    """
    创建资源的字段
    """
    name: str
    pid: int
    url: str
    restype: int





class company_table(BaseModel):
    """
    公司表
    """
    name: str
    coding: int
    type: int
    sort: int





# 用户表
class Users_table(BaseModel):
    account: str
    password: str
    name: str
    sex: int
    number: int
    phone: str
    company_id: int
    depart_id: int
    pid: int
    jid: int
    rid: int


# 岗位表
class Station_table(BaseModel):
    name:str
    coding:int
    sort:int
    desc:str

# 职务
class Position_table(BaseModel):
    duty_num: int
    sort: int
    uid: int
    cid: int
    duty_name: str
    descripe:str


class RoleUpdate(BaseModel):
    """
    角色更新字段
    """
    role_name: Optional[str] = None
    re_mark: Optional[str] = None
